/**
*    CTR - Centro Tecnologia Rocci
*    Open Source Java Classic Game Toolkit
*
*    (C) 2010, CTR - Centro Tecnologia Rocci
*
*    This library is free software; you can redistribute it and/or
*    modify it under the terms of the GNU Lesser General Public
*    License as published by the Free Software Foundation;
*    version 2.1 of the License.
*
*/
package it.ctr.game.toolkit;

import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JFrame;

/**
 * @author Luca Rocci, 09/ago/2010
 * Classe principale per avviare il gioco
 */
public class GameLauncher {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
	       GameComponent  mainGame = new GameComponent();
	        JFrame frame = new JFrame("CTR Game Toolkit");
	        frame.setContentPane(mainGame);
	        frame.pack();
	        frame.setResizable(false);
	        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	        
	        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
	        frame.setLocation((screenSize.width-frame.getWidth())/2, (screenSize.height-frame.getHeight())/2);
	        
	        frame.setVisible(true);
	        
	        mainGame.start();
	}

}
